<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:p="http://primefaces.prime.com.tr/ui">




<ui:composition template="nightbeach/masterpage.xhtml">

	<ui:define name="contentType">

		<script language="JavaScript">
	function redirecionar() {
		location.href = "teste.xhtml";

	}
</script>

		<h:form>



			<h3>Inline</h3>
			<p:calendar value="#{CalendarBean.date1}" mode="inline" />

			<h3>Popup</h3>
			<p:calendar value="#{CalendarBean.date2}" />

			<h3>Popup Button</h3>
			<p:calendar value="#{CalendarBean.date3}" showOn="button" />

			<h:panelGrid columns="2" style="margin-top:10px">
				<p:commandButton value="Submit" update="display"
					onclick="dialog.show()" />

				<p:ajaxStatus style="width:16px;height:16px;">
					<f:facet name="start">
						<h:graphicImage value="../design/ajaxloading.gif" />
					</f:facet>

					<f:facet name="complete">
						<h:outputText value="" />
					</f:facet>
				</p:ajaxStatus>
			</h:panelGrid>

			<p:dialog header="Selected Dates" widgetVar="dialog"
				showEffect="fold" hideEffect="fold" height="150">

				<h:panelGrid id="display" columns="2" cellpadding="5">

					<h:outputText value="Inline Date:" />
					<h:outputText value="#{CalendarBean.date1}">
						<f:convertDateTime pattern="MM/dd/yyyy" />
					</h:outputText>

					<h:outputText value="Popup Date:" />
					<h:outputText value="#{CalendarBean.date2}">
						<f:convertDateTime pattern="MM/dd/yyyy" />
					</h:outputText>

					<h:outputText value="Popup Button Date: " />
					<h:outputText value="#{CalendarBean.date3}">
						<f:convertDateTime pattern="MM/dd/yyyy" />
					</h:outputText>

				</h:panelGrid>

			</p:dialog>

			<p:commandButton value="Valterfi" onclick="redirecionar()" />

		</h:form>

		<br />
		<br />
	</ui:define>

</ui:composition>

</html>